package com.yj.cmp.sdk.fusioncompute.network.securitygroup.dto;


import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@NoArgsConstructor
@Data
public class SecurityGroupDto {

    @SerializedName("sgName")
    private String sgName;
    @SerializedName("sgDescription")
    private String sgDescription;
    @SerializedName("rules")
    private List<RulesDTO> rules;

    @NoArgsConstructor
    @Data
    public static class RulesDTO {
        @SerializedName("ipProtocol")
        private String ipProtocol;
        @SerializedName("ipRanges")
        private String ipRanges;
        @SerializedName("fromPort")
        private Integer fromPort;
        @SerializedName("toPort")
        private Integer toPort;
        @SerializedName("allowedSGID")
        private Long allowedSGID;
        @SerializedName("direction")
        private Integer direction;
    }
}